home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93b.txt
/
000077_icon-group-sender _Mon May 10 23:34:34 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1993-06-16
|
3KB
Received: by cheltenham.cs.arizona.edu; Tue, 11 May 1993 06:08:56 MST
Date: Mon, 10 May 93 23:34:34 PDT
Message-Id: <9305110634.AA11851@internal.apple.com>
To: icon-group@cs.arizona.edu
From: nevin@apple.com (Nevin ":-]" Liber)
X-Sender: nevin@130.43.2.2
Subject: Re: runtime debugger and the Icon fan club.
Cc: stephen@acm.org (Stephen P Spackman)
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
Stephen Spackman (stephen@acm.org) writes:
>I think the only reason you say this is that you are used to Icon. In
>Algol68 this was the preferred method, and indeed the Gnu C formatting
>standard follows this venerable tradition. The idea is that this:
>
> ( a
> * broof
> * cl
> )
>
>is much clearer than this:
>
> ( a *
> broof *
> cli )
I disagree. At first glance, I and most other C programmers would
interpret the expression "* broof" as a dereference of the pointer broof.
I would have to go back and find the type of broof (and that might require
going through many headers full of typedefs) before I'd be sure of what was
intended here.
>(This isn't the optimal strategy for C, because it chooses to
>make ; a statement *terminator* rather than a *separator* as God
>intended
I beleive that HCI (human computer interface) folks have done studies that
show that it is easier for programmers to have semicolons as terminators
than as seperators. I've always found that it always takes a little effort
in Pascal (where semicolons are seperators) to determine whether or not a
semicolon is even allowed in certain situations (you have to always think
about what it MEANS), where in C it is almost a no-brainer (you are allowed
to put them after any statement without changing the semantics of the code
you are writing). In Icon it is a no-brainer since in practice I've never
actually had occasion to use one.
>That is, you'd really like this to work too:
>
> { something
> ; something else
> ; another something
> }
>
>but it doesn't because C goes and demands an extra semicolon at the
>end. C's a mess.)
I've written a lot of C (and even some Pascal/Modula 2) code in my time,
and I've never wanted to write code like this (although ANSI C does have
some annoying things like allowing an extra comma at the end of a structure
initialisation list, but disallowing it at the end of an enumeration list,
but I digress). The only time I've ever needed to remotely do something
like this was for an MPW (Macintosh Programmer's Workshop -- a development
environment for Macintosh) script I was writing which needed to call a
different tool (StreamEdit, for those who might care) on itself from within
the script (StreamEdit considers semicolon as a comment character), but
this was only to make up for deficiencies in the scripting language (no
"here" documents, for those people familiar with Unix shells). It
certainly isn't the norm, and would need a very good reason before it could
pass even a simple code review.
___
NEVIN ":-)" LIBER, Blue Meanie, Macintosh System Software
email: nevin@apple.com paper: Apple Computer, Inc.
voice: (408) 974-MIX1 2 Infinite Loop, MS: 302-4Q
AppleLink: BADENOV Cupertino, CA 95014